package cn.hh.redis.config;

import cn.hh.redis.bean.SftpBean;
import cn.hh.redis.bean.SftpBeanEx;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author huangh
 * @date 2021/12/03
 * @Description:
 */
@Configuration
public class ConfigBean {

    @Bean
    public SftpBeanEx sftpBeanEx(SftpBean sftp){
       return new SftpBeanEx(sftp.getUsername(),sftp.getPassword(),sftp.getBaseadd(),"额外属性");
    }

    @Bean
    public SftpBeanEx sftpBeanEx2(SftpBean sftp){
        return new SftpBeanEx(sftp.getUsername(),sftp.getPassword(),sftp.getBaseadd(),"额外属性2");
    }

    @Bean(value = "sftpBeanEx3")
    public SftpBeanEx sftpBeanEx4(SftpBean sftp){
        return new SftpBeanEx(sftp.getUsername(),sftp.getPassword(),sftp.getBaseadd(),"额外属性3");
    }
}
